﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="clr-namespace:Netflix.ClientApp.Converters">

    <SolidColorBrush x:Key="ForegroundBrush" Color="#FFf6f0d9"/>
    <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

    <converters:BooleanToVisibilityConverter x:Key="NagationBooleanToVisibilityConverter" IsNegation="True"/>

    <!-- DataTemplates for MyTitleItemView  -->
    <DataTemplate x:Key="MyTopDVDMoviesItemTemplate">
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Height="120">
            <Image  CacheMode="BitmapCache" Source="{Binding Item.Image}"   Width="82" Stretch="Uniform"  Margin="10,10,5,10"/>
            <StackPanel  Margin="10,10,5,10">
                <TextBlock Text="{Binding Item.Name}" Foreground="{StaticResource ForegroundBrush}" TextWrapping="Wrap"  Margin="0,0,5,0"/>
                <StackPanel Orientation="Vertical" Margin="0,0,10,0" >
                    <TextBlock TextWrapping="Wrap"  Foreground="{StaticResource ForegroundBrush}"  Margin="0,0,0,5">Available: <Run  Text="{Binding Item.AvailableFrom,  StringFormat='\{0:d MMMM yyyy\}'}" /></TextBlock>
                </StackPanel>
            </StackPanel>
        </StackPanel>
    </DataTemplate>

    <DataTemplate x:Key="MyNewDVDMoviesItemTemplate">
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"  Height="120">
            <Image  CacheMode="BitmapCache" Source="{Binding Item.Image}"   Width="82" Stretch="Uniform"  Margin="10,10,5,10"/>
            <StackPanel  Margin="10,10,5,10">
                <TextBlock Text="{Binding Item.Name}" Foreground="{StaticResource ForegroundBrush}" TextWrapping="Wrap"  Margin="0,0,5,0"/>
                <StackPanel Orientation="Horizontal" Margin="0,10,10,0">
                    <TextBlock  Margin="0,0,5,5" Text="Rating:" Foreground="{StaticResource ForegroundBrush}" />
                    <TextBlock  Margin="0,0,0,5" Text="{Binding Item.Rating}" Foreground="{StaticResource ForegroundBrush}"/>
                </StackPanel>
                <StackPanel Orientation="Vertical" Margin="0,0,10,0" >
                    <TextBlock TextWrapping="Wrap"  Foreground="{StaticResource ForegroundBrush}"  Margin="0,0,0,5">Available: <Run  Text="{Binding Item.AvailableFrom,  StringFormat='\{0:d MMMM yyyy\}'}" /></TextBlock>
                </StackPanel>
            </StackPanel>
        </StackPanel>
    </DataTemplate>
</ResourceDictionary>
